﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VoicePhone.Common
{
    public enum APIType
    {
        Control,
        Transfer,
        Manage,
        //Accept,
        Notify,
        Event,
        Cdr
    }

    public enum ControlType
    {
        Query,
        Assign,
        Hold,
        Unhold,
        Mute,
        Unmute,
        Monitor,
        Talk,
        Listen,
        Bargein,
        Clear
    }

    public enum TransferType
    {
        Connect,
        Queue,
        Conference
    }

    public enum ManageType
    {
        Query,
        Remove
    }

    public enum NotifyType
    {
        Accept,
        Clear
    }

    public enum EventType
    {
        BOOTUP,
        CONFIG_CHANGE,
        BUSY,
        IDLE,
        ONLINE,
        OFFLINE,
        RING,
        ALTER,
        ANSWER,
        ANSWERED,
        BYE,
        DIVERT,
        TRANSIENT,
        FAILED,
        INVITE,
        INCOMING,
        DIMF,
        EndOfAnn,
        QUEUE
    }

    public enum CdrType
    {
        IN,
        OU,
        LO,
        FI,
        FW,
        CB
    }

    public enum CallFailedReason
    {
        /// <summary>
        /// 失败
        /// </summary>
        TempFailure = 1,
        /// <summary>
        /// 主叫的呼叫权限受限
        /// </summary>
        Restricted,
        /// <summary>
        /// 被叫分机不在线
        /// </summary>
        CDPNOffline,
        /// <summary>
        /// 被叫分机当前正在和其他终端通话
        /// </summary>
        OtherCall,
        /// <summary>
        /// 中继线资源不足，无法执行外呼
        /// </summary>
        NoCircuit,
        /// <summary>
        /// 被叫分机忙线
        /// </summary>
        Busy,
        /// <summary>
        /// 分机不存在
        /// </summary>
        NotExist,
        /// <summary>
        /// 主叫分机自身不在线
        /// </summary>
        CPNOffline
    }
}
